﻿using System;
namespace homework1 {
    public class HomeWork1 {

        public bool IsSu(int num) {
            if (num <= 1)
            {
                return false;
            }
            for (int i = 2; i < num; i++) {
                if (num % i == 0) {
                    return false;
                }
            }
            return true;
        }
        public void PrintSu(int a, int b) {
            Console.WriteLine(a + "和" + b + "之间的素数有");
            if (a > b) {
                Console.WriteLine("输入错误");
            }
            for (int i = a; i <= b; i++) {
                if (IsSu(i)) {
                 Console.Write(i + " ");
                }
            }
          
        }
    public static void Main(string[] args)
        {
            HomeWork1 hm1=new HomeWork1();
            int a, b;
            string input1, input2;
            string name = "赵紫东";
            Console.WriteLine("你好，我是"+name);
            while (true) {
               input1= Console.ReadLine();
               input2=Console.ReadLine();
                a=int.Parse(input1);
                b=int.Parse(input2);
                hm1.PrintSu(a, b);
            }
        }
    }

}